_gdk_wayland_cursor_get_buffer was not initializing
its out variables in the 'not found' case. This
was showing up in protocol traces as garbage hotspots
being sent to the compositor.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1328
struct wl_cursor *c;
if (g_str_equal (gdk_cursor_get_name (cursor), "none"))
- {
- *hotspot_x = 0;
- *hotspot_y = 0;
- *width = 0;
- *height = 0;
- *scale = 1;
- return NULL;
- }
+ goto none;
c = gdk_wayland_cursor_load_for_name (display,
_gdk_wayland_display_get_scaled_cursor_theme (display, desired_scale),
width, height,
scale);
+none:
+ *hotspot_x = 0;
+ *hotspot_y = 0;
+ *width = 0;
+ *height = 0;
+ *scale = 1;
+
return NULL;
}